import Vue from 'vue';
import Router from 'vue-router';
import IndexPage from '@/page/Index';
import AboutCSS from '@/page/css/index';
import BFC from '@/page/css/BFC';
import cssCenter from '@/page/css/cssCenter';
import Input from '@/page/demo/input';
import Flex from '@/page/css/flex';
import lifeCycle from '@/page/vue/lifeCycle';

Vue.use(Router);

export default new Router({
  mode: 'history',
  routes: [
    {
      path: '/',
      name: 'Index',
      component: IndexPage,
    },
    {
      path: '/css',
      component: AboutCSS,
    },
    {
      path: '/css/BFC',
      component: BFC,
    },
    {
      path: '/css/cssCenter',
      component: cssCenter,
    },
    {
      path: '/css/flex',
      component: Flex,
    },
    {
      path: '/demo/input',
      component: Input,
    },
    {
      path: '/vue/lifeCycle',
      component: lifeCycle,
    },
  ],
});
